#include <iostream>
#define SIZE 50
#define mark 32000

using namespace std;

int numbers[SIZE], n = 5;

int main()
{
	int i, p, j;
	for (i = 0; i < p - 1; ++i)
		numbers[i] = mark;
	
	for (i = 1, p = 0; i <= n; ++i, p += 2)
	{	
		cout << "number: ";
		cin >> numbers[p];
		if ((numbers[p - 2] + numbers[p]) / 2 < 5)
			numbers[p - 1] = 5;
		else
			numbers[p - 1] = mark;
	}
	
	for (i = 0; i < p - 1; ++i)
		if (numbers[i] != mark)
			cout << numbers[i] << endl;
	
	return 0;
}

